cmake_minimum_required(VERSION 3.0.0)
project(SocketWrapper VERSION 0.1.0)

include_directories(include)

file(GLOB_RECURSE SRC_FILES ./src/*.cpp)

add_executable(${PROJECT_NAME} tests.cpp ${SRC_FILES})



message("current system: ${CMAKE_SYSTEM_NAME}")
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOS_WINDOWS -D_WIN32_WINNT=0x0601 -DFD_SETSIZE=1024")
    target_link_libraries(${PROJECT_NAME} PRIVATE ws2_32)
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOS_LINUX")
    target_link_libraries(${PROJECT_NAME} PRIVATE pthread)
elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOS_MACOS")
endif()